﻿using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using WPFExcelReport.Helpers;
namespace WPFExcelReport
{
    public partial class TVKKVR05 
    {
         

        public TVKKVR05()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VVRPOS();
            DataContext = MV;
            InitializeComponent(); 
        }
        public override void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            if (IsLoaded)
                return; 
            base.Window_Loaded(sender, e);
        }
        public override void OnLoadChg(bool value)
        {
            if (!value)
                return;
            string key = "";
            if(VKK!="")
            {
                key = VKK;
                VKK = "";
                VKK = key; 
            }
            base.OnLoadChg(value);
        }
        public override void LOADBYVKK(string value)
        {
            base.LOADBYVKK(value);
        }
        public override void ManageCommand(object sender, RoutedEventArgs e)
        {
            if (!IsManage)
            {
                VICC_WFEVENTS.SVWF.VR02(RUNID, VKK);
            }
            else
            {
                string value = VKK;
                VKK = "";
                VKK = value;
            }
            base.ManageCommand(sender, e);
        }

        private void RefreshCommand(object sender, RoutedEventArgs e)
        {
            LOADBYVKK(VKK);
        }
    }
}